package com.fram.common.canstant;

/**
 * @作者： 陳曉鬆 @时间： 2018年5月12日 - 下午10:06:46 @description：->
 */
public enum ErrCode {

	SUC(200, "成功"),
	ERR(500, "服务器程序异常"),
	ERR_INVALIDSECRET(10000, "签名验证错误"),
	ERR_INVALIDSECRET_NO_EXISTED(10001, "没有权限访问"),
	FAIL(10002, "失败"),
	ERR_PARAMETER(10003, "参数错误"),
	ERR_VERIFICATIONCODE_FAIL(10004, "验证码发送失败"),
	VERIFICATIONCODE_BE_OVERDUE(10005, "验证码已经过期"),
	VERIFICATIONCODE_FAIL(10006, "验证码匹配错误"),
	NO_DATA(10007, "数据不存在"),
	USER_GETWECHAT_FAIL(20000, "微信获取用户信息失败"),
	USER_DB_INSERT_FAIL(20001, "用户注册失败"),
	USER_LOGIN_FAIL(20002, "登录失败"),
	
	USER_LOGIN_TOKEN_FAIL(20003, "登录TOKEN错误"),
	USER_LOGIN_BE_OVERDUE(20004, "您的登录信息已过期"),
	USER_NO_LOGIN(20005, "您还未登录"),
	USER_PHONE_NO_EXIST(20006, "该手机号码还未注册"),
	USER_LOGIN_PASSWORD_FAIL(20007, "密码错误"),
	USER_UPDATE_FAIL(20008, "更新账户信息发生错误"),
	USER_PHONE_HAVE_EXISTED(20009, "该手机号已经被使用"),
	USER_PHONE_BIND_FAIL(20010, "手机号绑定失败"),
	USER_IS_NOT_EXISTL(20011, "帐号不存在"),
	USER_IS_EXCEPTION(20012, "帐号已经被冻结"),
	USER_URL_NO_REQUEST(20013, "没有访问权限"),
	USER_WECHAT_BIND_FAIL(20014, "微信绑定失败"),
	USER_PHONE_NO_SET_PASSWORD(20015, "该手机号码未设置密码登录"),
	USER_UPDATE_PASSWORD(20016, "修改密码错误"),

	NEWS_OPERATE_FAIL(30000, "操作失败"),
	NEWS_COMMENT_FAIL(30001, "评论失败"),

	ORDER_ADD_CART_FAIL(40000, "加入购物车失败"),
	ORDER_CART_DATA_FAIL(40001, "购物车数据发生错误"),
	ORDER_DELETE_CART_FAIL(40002, "删除购物车数据失败"),
	ORDER_UPDATE_CART_FAIL(40003, "修改购物车数据失败"),
	ORDER_INSERT_FAIL(40004, "创建订单失败"),
	ORDER_STATUS_UPDATE(40005, "订单状态发生改变"),
	ORDER_STATUS_NO_REFUND(40006, "该订单无法申请退货退款"),
	ORDER_NO_REQUEST(40007, "无权限访问该订单"),
	ORDER_NO_REFUND_REQUEST(40008, "该订单没有提交退货申请"),
	ORDER_REFUND_DEAL(40009, "该订单商家已经处理,无法撤销"),

	ERR_HAVE_EXISTED(10008, "数据已经存在");

	private Integer returnCode;

	private String returnMsg;

	private ErrCode(Integer returnCode, String returnMsg) {
		this.returnCode = returnCode;
		this.returnMsg = returnMsg;
	}

	public Integer getReturnCode() {
		return returnCode;
	}

	public void setReturnCode(Integer returnCode) {
		this.returnCode = returnCode;
	}

	public String getReturnMsg() {
		return returnMsg;
	}

	public void setReturnMsg(String returnMsg) {
		this.returnMsg = returnMsg;
	}

}
